import $ from 'jquery';
global.$ = global.jQuery = $;

import "./../css/style.min.css";
import Cookies from "js-cookie";
require("./../js/lyear-loading.js");

(function ($) {
    if (self != top) {
        parent.location.assign(location.href);
    }
    $(".recaptcha").captcha();

    $("input[name='mobile']").keyup(function () {
        var mobile = $(this).val();
    
        Cookies.set("last_username", mobile);
    });

    $("button[type='submit']").click(function () {
        var l = $(this).lyearloading({ opacity: 0.2, spinnerSize: 'nm' });
        setTimeout(function () {
            l.destroy();
        }, 1e3)
    });

    if (error) {
        layer.msg(error, {
            time: 25000, // 2s后自动关闭
            icon: "cry",
            skin: "bg-info",
            offset: '100px', // 右下角弹出
        });
    }
})(jQuery);
